function getter() {
  console.log('我出现了')
}

function greeter(person: string) {
  return 'hellow,' + person
}

let user = 'wuyucun' // 这样一点问题都没有。但是如果是

let erroUser = [1,2]

document.body.innerHTML = greeter(user)

//greeter(erroUser) // 报错了： Argument of type 'number[]' is not assignable to parameter of type 'string'.

interface Person {
  firstName: string,
  lastName: number
}

function greeter1(person: Person) {
  return 'Hellow,' + person.firstName + ',' + person.lastName
}

let user1 = {
  firstName: 'wyc',
  lastName: 1
}
let greetera = greeter1(user1)